// 景点相关接口

/**
 * data传递的body参数
 * params：传递的query参数
 */
import myAxios from '@/utils/config/axiosConfig'

/**
 * 加载地图进入得到所有的景点的部分信息
 * @returns
 */
export const fetchAllBriefScenic = async () => {
  const res = myAxios.request({
    url: '/user/scenery/getBriefScenic',
    method: 'GET',
  })
  return res
}

/**
 * 获取详细的景点信息
 * @param params query参数
 * @returns
 */
export const fetchScenicDetail = async (params: { scenicId: number }) => {
  const res = await myAxios.request({
    url: '/user/scenery/getScenic',
    method: 'GET',
    params,
  })
  return res
}
/**
 * 攻略·景点版块得到所有的城市分类
 */
export const fetchCityCluster = async (params: {
  cityName: string
  page: number
  pageSize: number
}) => {
  const res = await myAxios.request({
    url: '/user/scenery/getScenicByCity',
    method: 'GET',
    params,
  })
  return res
}
